﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Threads
{
    class Program
    {
        static void Main(string[] args)
        {
            ThreadStart del;
            del = new ThreadStart(testMethod);
            Thread thread = new Thread(del);
            thread.Start();
            for (int i = 0; i <= 100; i++)
            {
                for (int k = 1; k <= 20; k++)
                {
                    Console.Write("X");
                }
                Console.WriteLine("Sekundär-Thread " + i);
            }
        } // end static void Main(string[] args)
        // Diese Methode wird in einem eigenen Thread ausgeführt.
        public static void testMethod()
        {
            for (int i = 0; i <= 100; i++)
            {
                for (int k = 1; k <= 20; k++)
                {
                    Console.Write("X");
                }
                Console.WriteLine("Sekundär-Thread " + i);
            }
        } // end testMethod()
    } // end class Program
} // end namespace Threads
